//
//  DCHttpManager.h
//  Demo
//
//  Created by Kyle on 2022/12/31.
//

#import <Foundation/Foundation.h>

@class DCResponseData;
NS_ASSUME_NONNULL_BEGIN

typedef void(^NSmartCompleteBlock)(NSURLSessionDataTask *operation, DCResponseData *responseObject);

@interface DCHttpManager : NSObject

/**
 TODO:单利初始化
 
 @return 单利对象
 */
+ (DCHttpManager *)shareInfo;

/**
 TODO:POST方法
 
 @param url 请求路径
 @param parameters 传参
 @param completeBlock 完成回调
 @return 当前任务
 */
- (NSURLSessionDataTask *)postMessageWithUrl:(NSString *)url parameters:(NSDictionary *)parameters complete:(NSmartCompleteBlock)completeBlock;
- (NSURLSessionDataTask *)postMessageContentImageWithUrl:(NSString *)url parameters:(NSDictionary *)parameters complete:(NSmartCompleteBlock)completeBlock;
@end

NS_ASSUME_NONNULL_END
